package com.zy.design.pattern.strategy.sort;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * @author zhaoyi
 * @date 2021/8/17 17:22
 */
public class SortFactory {

    private static final Map<String, ISort> map = Maps.newHashMap();

    static {
        map.put("LocalSort", new LocalSort());
        map.put("ExternalSort", new ExternalSort());
        map.put("ConcurrentExternalSor", new ConcurrentExternalSor());
    }

    public static ISort getSort(String name) {
        return map.get(name);
    }
}
